package a.j;

import a.c.e;
import a.c.q;
import a.d.o;
import a.d.s;
import a.d.t;
import a.e.c;
import a.f.ac;
import a.f.cc;
import a.f.vb;
import a.f.xc;
import a.f.yc;

import java.awt.font.FontRenderContext;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Vector;

public class jg
  extends hg
  implements xc
{
  public static final byte w = 100;
  public static final byte bb = 101;
  public static final byte cb = 102;
  public static final byte db = 117;
  public static final byte eb = 118;
  public static final byte fb = 119;
  public static final byte gb = 120;
  public static final byte hb = 115;
  public static final byte ib = 116;
  public static final byte jb = 103;
  public static final byte kb = 104;
  public static final byte lb = 105;
  public static final byte mb = 106;
  public static final byte nb = 107;
  public static final byte ob = 108;
  public static final byte pb = 109;
  public static final byte qb = 110;
  public static final byte rb = 111;
  public static final byte sb = 112;
  public static final byte tb = 114;
  public static final byte ub = 113;
  public static final byte vb = 0;
  public static final byte wb = 1;
  public static final byte xb = 2;
  public static final byte yb = 3;
  public static final byte zb = 4;
  public static final byte Ab = 5;
  public static final byte Bb = 6;
  public static final byte Cb = 127;
  public static final byte Db = 1;
  public static final byte Eb = 3;
  public static final byte Fb = 2;
  private static final byte Gb = 6;
  private static final byte[][] Hb = { { 104, 105, 106, 107 }, { 100, 102, 101, 115, 116, 117, 118, 119, 120 }, { 108, 109 }, { 108, 109, 111, 110 }, { 114 }, { 108, 109, 110, 111, 104, 105, 107, 106 }, { 112 } };
  ld Ib;
  private yc Jb = new vb(130816, this.Lb);
  private Object Kb = new Integer(1);
  private double Lb = 4.0D;
  private static final hg.a_ Mb;
  private static final hg.c_ Nb;
  static Class Ob;
  static Class Pb;
  static Class Qb;
  static Class Rb;
  static Class Sb;
  static Class Tb;
  static Class Ub;
  public static int Vb;
  
  public void g(byte paramByte)
  {
    super.g(paramByte);
  }
  
  public void c(String paramString)
  {
    b().a(this, paramString);
  }
  
  public static hg.c_ b()
  {
    return Nb;
  }
  
  public jg(String paramString, byte paramByte)
  {
    e(paramByte);
    a(paramString);
  }
  
  public jg(String paramString)
  {
    this(paramString, (byte)1);
  }
  
  void j()
  {
    boolean bool = ld.E;
    if (((bool) || (this.Ib != null)) && ((bool) || (this.Ib.n() != null)))
    {
      q localq = this.Ib.n().g();
      if ((bool) || ((localq instanceof g)))
      {
        g localg = (g)localq;
        localg.k(this);
      }
    }
  }
  
  public jg()
  {
    this("");
  }
  
  public Object clone()
  {
    jg localjg = new jg();
    localjg.a(this);
    return localjg;
  }
  
  public void a(hg paramhg)
  {
    boolean bool = ld.E;
    super.a(paramhg);
    if ((bool) || ((paramhg instanceof jg)))
    {
      jg localjg = (jg)paramhg;
      f(localjg.cb());
      if (!bool)
      {
        if (D() != 127)
        {
          if (bool) {
            break label80;
          }
          if (a() != null) {}
        }
        else
        {
          if (bool) {
            break label84;
          }
          a(localjg.a(), localjg.e());
        }
      }
      else if (!ld.D) {
        return;
      }
      label80:
      label84:
      a(localjg.e());
    }
  }
  
  public void c(double paramDouble1, double paramDouble2)
  {
    super.c(paramDouble1, paramDouble2);
    if ((ld.E) || ((this.Jb instanceof cc))) {
      this.Kb = new cc.a_(paramDouble1, paramDouble2);
    }
  }
  
  public void p()
  {
    if ((this.N == 2) || (this.N == 1) || (this.N == 3)) {
      o();
    }
    super.p();
  }
  
  public void o()
  {
    super.o();
    if (this.Ib != null) {
      this.Ib.d(this);
    }
  }
  
  hg.a_ l()
  {
    return Mb;
  }
  
  public void a(String paramString)
  {
    String str = H();
    if (paramString.equals(str)) {
      return;
    }
    super.a(paramString);
    g localg = ib();
    if (localg != null) {
      localg.a(this, "text", str, H());
    }
  }
  
  public void f(double paramDouble)
  {
    this.Lb = paramDouble;
    if ((this.Jb instanceof vb)) {
      ((vb)this.Jb).a(this.Lb);
    }
    p();
  }
  
  public double cb()
  {
    return this.Lb;
  }
  
  public yc a()
  {
    return this.Jb;
  }
  
  public void a(yc paramyc)
  {
    c(paramyc);
    p();
  }
  
  public void a(yc paramyc, Object paramObject)
  {
    c(paramyc);
    d(paramObject);
    p();
  }
  
  private void c(yc paramyc)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    this.Jb = paramyc;
    if (!bool2) {
      if (paramyc == null)
      {
        this.C = 127;
        if (!bool1) {
          return;
        }
      }
    }
    if (!bool2) {}
    if (paramyc.getClass() == (Sb == null ? (jg.Sb = e("a.f.vb")) : Sb))
    {
      int i = ((vb)paramyc).b();
      if (!bool2)
      {
        switch (i)
        {
        case 57: 
          this.C = 3;
          if (!bool2) {
            if (!bool1) {
              return;
            }
          }
        case 198: 
          this.C = 0;
          if (!bool2) {
            if (!bool1) {
              return;
            }
          }
        case 130816: 
          this.C = 1;
          if (!bool2) {
            if (!bool1) {
              return;
            }
          }
        case 33: 
          this.C = 2;
          if (!bool2) {
            if (!bool1) {
              return;
            }
          }
        case 255: 
          this.C = 5;
          if (bool2) {
            break label209;
          }
          if (!bool1) {
            return;
          }
          break;
        }
        this.C = 127;
      }
      label209:
      if (!bool1) {}
    }
    else
    {
      if (!bool2) {}
      if (paramyc.getClass() == (Tb == null ? (jg.Tb = e("a.f.cc")) : Tb))
      {
        this.C = 4;
        if (!bool1) {}
      }
      else
      {
        if (!bool2) {}
        if (paramyc.getClass() == (Ub == null ? (jg.Ub = e("a.f.ac")) : Ub))
        {
          if (bool2) {
            break label305;
          }
          this.C = 6;
          if (!bool1) {
            return;
          }
        }
        label305:
        this.C = 127;
      }
    }
  }
  
  public Object e()
  {
    return this.Kb;
  }
  
  public void a(Object paramObject)
  {
    d(paramObject);
    p();
  }
  
  private void d(Object paramObject)
  {
    this.Kb = paramObject;
    this.D = C();
  }
  
  public Object d(o paramo)
  {
    boolean bool = ld.E;
    if ((bool) || (this.Jb != null))
    {
      ld localld = hb();
      if ((bool) || (localld != null)) {
        return this.Jb.a(paramo, localld);
      }
    }
    return null;
  }
  
  public void e(byte paramByte)
  {
    if ((paramByte >= 0) && (paramByte <= 6))
    {
      ld localld = this.Ib;
      this.C = paramByte;
      yc localyc = this.Jb;
      switch (this.C)
      {
      case 0: 
        this.Jb = new vb(198, this.Lb);
        break;
      case 1: 
        this.Jb = new vb(130816, this.Lb);
        break;
      case 2: 
        this.Jb = new vb(33, this.Lb);
        break;
      case 3: 
        this.Jb = new vb(57, this.Lb);
        break;
      case 4: 
        this.Jb = new cc();
        break;
      case 5: 
        this.Jb = new vb(255, this.Lb);
        break;
      case 6: 
        this.Jb = new ac(ib(), gb());
      }
      if (((localyc instanceof vb)) && ((this.Jb instanceof vb)))
      {
        vb localvb = (vb)this.Jb;
        if (localvb.a(this.Kb))
        {
          if (this.Lb != ((vb)localyc).c()) {
            p();
          }
          return;
        }
      }
      this.Kb = this.Jb.a();
      if (((this.Jb instanceof cc)) && (localld != null))
      {
        double d1 = this.q.h();
        double d2 = this.q.i();
        double d3 = this.q.j();
        double d4 = this.q.d() + d1 * d2;
        double d5 = this.q.e() + d1 * d3;
        double d6 = this.s;
        o localo = new o(d4 - d6 * d2 + this.Ib.a(), d5 - d6 * d3 + this.Ib.b(), this.r, d6, d2, d3);
        this.Kb = this.Jb.a(localo, localld);
      }
      this.D = C();
      p();
    }
    else if (127 == paramByte)
    {
      this.C = 127;
      this.Jb = null;
    }
  }
  
  public boolean db()
  {
    if (!ld.E) {}
    return this.C == 4;
  }
  
  public void d(byte paramByte)
  {
    if (!(this.Jb instanceof vb)) {
      return;
    }
    vb localvb = (vb)this.Jb;
    int i = 0;
    switch (paramByte)
    {
    case 100: 
      i = 256;
      break;
    case 101: 
      i = 512;
      break;
    case 102: 
      i = 1024;
      break;
    case 117: 
      i = 8192;
      break;
    case 118: 
      i = 16384;
      break;
    case 119: 
      i = 32768;
      break;
    case 120: 
      i = 65536;
      break;
    case 115: 
      i = 2048;
      break;
    case 116: 
      i = 4096;
      break;
    case 104: 
      i = 2;
      break;
    case 105: 
      i = 4;
      break;
    case 106: 
      i = 128;
      break;
    case 107: 
      i = 64;
      break;
    case 108: 
      i = 1;
      break;
    case 109: 
      i = 32;
      break;
    case 110: 
      i = 8;
      break;
    case 111: 
      i = 16;
    }
    Integer localInteger = new Integer(i);
    if (localvb.a(localInteger))
    {
      this.Kb = localInteger;
    }
    else
    {
      System.err.println("NLabel::setPos: ERROR: pos " + paramByte + " not valid for model " + this.C);
      return;
    }
    p();
  }
  
  public byte C()
  {
    if ((this.Jb instanceof vb))
    {
      int i = ((Integer)this.Kb).intValue();
      switch (i)
      {
      case 256: 
        return 100;
      case 1024: 
        return 102;
      case 512: 
        return 101;
      case 8192: 
        return 117;
      case 16384: 
        return 118;
      case 32768: 
        return 119;
      case 65536: 
        return 120;
      case 2048: 
        return 115;
      case 4096: 
        return 116;
      case 4: 
        return 105;
      case 2: 
        return 104;
      case 128: 
        return 106;
      case 64: 
        return 107;
      case 1: 
        return 108;
      case 8: 
        return 110;
      case 16: 
        return 111;
      case 32: 
        return 109;
      }
    }
    if ((this.Jb instanceof cc)) {
      return 114;
    }
    if ((this.Jb instanceof ac)) {
      return 112;
    }
    return 113;
  }
  
  public void f(double paramDouble1, double paramDouble2)
  {
    if (!ld.E)
    {
      if (this.C != 4)
      {
        System.err.println("WARNING: cannot set label offset directly. Label is not freely positionable.");
        return;
      }
      ((cc.a_)this.Kb).a(paramDouble1, paramDouble2);
    }
    p();
  }
  
  public static Map eb()
  {
    LinkedHashMap localLinkedHashMap = new LinkedHashMap(11);
    localLinkedHashMap.put(new Byte((byte)1), "Internal");
    localLinkedHashMap.put(new Byte((byte)0), "Corners");
    localLinkedHashMap.put(new Byte((byte)2), "Sandwich");
    localLinkedHashMap.put(new Byte((byte)3), "Sides");
    localLinkedHashMap.put(new Byte((byte)4), "Free");
    localLinkedHashMap.put(new Byte((byte)5), "8-Pos");
    localLinkedHashMap.put(new Byte((byte)6), "Edge Opposite");
    return localLinkedHashMap;
  }
  
  public static Map fb()
  {
    LinkedHashMap localLinkedHashMap = new LinkedHashMap(21);
    localLinkedHashMap.put(new Byte((byte)100), "Center");
    localLinkedHashMap.put(new Byte((byte)101), "Bottom");
    localLinkedHashMap.put(new Byte((byte)102), "Top");
    localLinkedHashMap.put(new Byte((byte)117), "Topleft");
    localLinkedHashMap.put(new Byte((byte)118), "Topright");
    localLinkedHashMap.put(new Byte((byte)119), "Bottomleft");
    localLinkedHashMap.put(new Byte((byte)120), "Bottomright");
    localLinkedHashMap.put(new Byte((byte)115), "Left");
    localLinkedHashMap.put(new Byte((byte)116), "Right");
    localLinkedHashMap.put(new Byte((byte)103), "Center X");
    localLinkedHashMap.put(new Byte((byte)104), "NorthWest");
    localLinkedHashMap.put(new Byte((byte)105), "NorthEast");
    localLinkedHashMap.put(new Byte((byte)106), "SouthEast");
    localLinkedHashMap.put(new Byte((byte)107), "SouthWest");
    localLinkedHashMap.put(new Byte((byte)108), "North");
    localLinkedHashMap.put(new Byte((byte)109), "South");
    localLinkedHashMap.put(new Byte((byte)110), "East");
    localLinkedHashMap.put(new Byte((byte)111), "West");
    localLinkedHashMap.put(new Byte((byte)113), "Undefined");
    localLinkedHashMap.put(new Byte((byte)112), "Dynamic");
    localLinkedHashMap.put(new Byte((byte)114), "Anywhere");
    return localLinkedHashMap;
  }
  
  public static byte[] i(byte paramByte)
  {
    return Hb[paramByte];
  }
  
  public static Vector a(Byte paramByte)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    Vector localVector = new Vector(10);
    byte[] arrayOfByte;
    int i;
    if ((bool2) || (paramByte != null))
    {
      arrayOfByte = i(paramByte.byteValue());
      i = 0;
    }
    while (i < arrayOfByte.length)
    {
      if (bool1) {
        break label93;
      }
      localVector.add(new Byte(arrayOfByte[i]));
      i++;
      if (bool1)
      {
        if (bool2) {
          break label93;
        }
        localVector.add(new Byte((byte)113));
      }
    }
    label93:
    return localVector;
  }
  
  public boolean n()
  {
    if (!ld.E) {
      if (this.C == 6) {
        return true;
      }
    }
    return super.n();
  }
  
  public void q()
  {
    ld localld = this.Ib;
    o localo = a().a(new s(S(), T()), localld, e());
    localo.f(-localld.a(), -localld.b());
    super.a(localo);
  }
  
  public e gb()
  {
    if (this.Ib != null) {
      return this.Ib.n();
    }
    return null;
  }
  
  public ld hb()
  {
    return this.Ib;
  }
  
  public g ib()
  {
    e locale = gb();
    if (locale != null) {
      return (g)locale.g();
    }
    return null;
  }
  
  public void a(ld paramld)
  {
    this.Ib = paramld;
    p();
  }
  
  public o d()
  {
    o localo = I();
    return localo.j(this.Ib.a(), this.Ib.b());
  }
  
  public void s()
  {
    boolean bool = ld.E;
    if (((!bool) && ((this.Ib != null) && (bool))) || (this.Ib.S() != null))
    {
      t localt = c();
      this.Ib.S().b(localt.d(), localt.e(), localt.b(), localt.c());
    }
  }
  
  public boolean a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    boolean bool = ld.E;
    if (!bool) {
      if (m()) {
        r();
      }
    }
    if (!bool) {
      if (n()) {
        q();
      }
    }
    return o.a(d(), new t(paramDouble1, paramDouble2, paramDouble3, paramDouble4), 0.0D);
  }
  
  public void a(Rectangle2D paramRectangle2D)
  {
    boolean bool = ld.E;
    if (!bool) {
      if (m()) {
        r();
      }
    }
    if (!bool) {
      if (n()) {
        q();
      }
    }
    t localt;
    if (paramRectangle2D.getWidth() < 0.0D)
    {
      localt = c();
      paramRectangle2D.setFrame(localt.d, localt.e, localt.a, localt.b);
      if (!bool) {
        if (!ld.D) {
          return;
        }
      }
    }
    else
    {
      localt = c();
    }
    paramRectangle2D.setFrameFromDiagonal(Math.min(localt.d, paramRectangle2D.getX()), Math.min(localt.e, paramRectangle2D.getY()), Math.max(localt.d + localt.a, paramRectangle2D.getX() + paramRectangle2D.getWidth()), Math.max(localt.e + localt.b, paramRectangle2D.getY() + paramRectangle2D.getHeight()));
  }
  
  public void a(ObjectOutputStream paramObjectOutputStream)
    throws IOException
  {
    paramObjectOutputStream.writeByte(2);
    super.a(paramObjectOutputStream);
    paramObjectOutputStream.writeDouble(cb());
  }
  
  public void a(ObjectInputStream paramObjectInputStream)
    throws IOException, ClassNotFoundException
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2) {}
    switch (paramObjectInputStream.readByte())
    {
    case 0: 
      super.a(paramObjectInputStream);
      if (!bool2) {
        if (!bool1) {
          return;
        }
      }
    case 1: 
      super.a(paramObjectInputStream);
      f(paramObjectInputStream.readDouble());
      g(paramObjectInputStream.readByte());
      if (!bool2) {
        if (!bool1) {
          return;
        }
      }
    case 2: 
      super.a(paramObjectInputStream);
      f(paramObjectInputStream.readDouble());
      if (!bool1) {
        return;
      }
      break;
    }
    throw new c();
  }
  
  static Class e(String paramString)
  {
    try
    {
      return Class.forName(paramString);
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
    }
  }
  
  static
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put(Ob == null ? (jg.Ob = e("a.j.hg$e_")) : Ob, hg.i_.e);
    localHashMap.put(Pb == null ? (jg.Pb = e("a.j.hg$b_")) : Pb, hg.i_.e);
    localHashMap.put(Qb == null ? (jg.Qb = e("a.j.hg$d_")) : Qb, new b_());
    localHashMap.put(Rb == null ? (jg.Rb = e("a.j.hg$g_")) : Rb, new pe((byte)0));
    Mb = new hg.a_(localHashMap, localHashMap, null);
    Nb = new hg.c_(localHashMap);
    localHashMap = new HashMap();
    localHashMap.put(Qb == null ? (jg.Qb = e("a.j.hg$d_")) : Qb, new a_());
    localHashMap.put(Ob == null ? (jg.Ob = e("a.j.hg$e_")) : Ob, new hg.h_());
    Nb.a("CroppingLabel", localHashMap);
  }
  
  static final class a_
    implements hg.d_
  {
    public void a(hg paramhg, FontRenderContext paramFontRenderContext)
    {
      boolean bool2 = ld.E;
      boolean bool1 = ld.D;
      if ((bool2) || ((paramhg instanceof jg)))
      {
        jg localjg = (jg)paramhg;
        localjg.E = false;
        hg.h_.f.a(paramhg, paramFontRenderContext, localjg.N);
        double d1 = localjg.u;
        double d2 = localjg.t;
        if (!bool2)
        {
          ld localld;
          switch (localjg.N)
          {
          case 4: 
            if (!bool1) {}
            break;
          case 2: 
            if (!bool2)
            {
              localld = localjg.hb();
              if (localld != null)
              {
                d1 = localld.d();
                if (!bool2) {
                  if (!bool1) {
                    break label197;
                  }
                }
              }
            }
            break;
          case 3: 
            if (!bool2)
            {
              localld = localjg.hb();
              if (localld != null)
              {
                d2 = localld.c();
                d1 = localld.d();
                if (!bool2) {
                  if (!bool1) {
                    break label197;
                  }
                }
              }
            }
            break;
          case 1: 
            if (!bool2)
            {
              localld = localjg.hb();
              if (localld != null) {
                d2 = localld.c();
              }
            }
            break;
          }
        }
        label197:
        localjg.a(d2, d1);
      }
    }
    
    public boolean a(hg paramhg, double paramDouble1, double paramDouble2)
    {
      return paramhg.h().a(paramDouble1, paramDouble2, true);
    }
  }
  
  static final class b_
    implements hg.d_
  {
    public void a(hg paramhg, FontRenderContext paramFontRenderContext)
    {
      boolean bool2 = ld.E;
      boolean bool1 = ld.D;
      if ((bool2) || ((paramhg instanceof jg)))
      {
        jg localjg = (jg)paramhg;
        hg.i_.e.a(paramhg, paramFontRenderContext);
        localjg.E = false;
        double d1 = localjg.u;
        double d2 = localjg.t;
        if (!bool2)
        {
          ld localld;
          switch (localjg.N)
          {
          case 4: 
            if (!bool1) {}
            break;
          case 2: 
            if (!bool2)
            {
              localld = localjg.hb();
              if (localld != null)
              {
                d1 = Math.max(d1, localld.d());
                if (!bool2) {
                  if (!bool1) {
                    break label213;
                  }
                }
              }
            }
            break;
          case 3: 
            if (!bool2)
            {
              localld = localjg.hb();
              if (localld != null)
              {
                d2 = Math.max(d2, localld.c());
                d1 = Math.max(d1, localld.d());
                if (!bool2) {
                  if (!bool1) {
                    break label213;
                  }
                }
              }
            }
            break;
          case 1: 
            if (!bool2)
            {
              localld = localjg.hb();
              if (localld != null) {
                d2 = Math.max(d2, localld.c());
              }
            }
            break;
          }
        }
        label213:
        localjg.a(d2, d1);
      }
    }
    
    public boolean a(hg paramhg, double paramDouble1, double paramDouble2)
    {
      return paramhg.h().a(paramDouble1, paramDouble2, true);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.jg

 * JD-Core Version:    0.7.0.1

 */